package com.springinaction.springidol;

/**
 * 一个会朗诵诗歌的杂技师
 * 多个对象的关联
 * 使用构造器注入
 * @time 2014年11月25日10:27:12
 * @author xupeng
 *
 */
public class PoeticJuggler extends Jugger {
	
	private Poem poem;

	public PoeticJuggler(Poem poem) {
		super();
		this.poem = poem;
	}

	public PoeticJuggler(int beanBags,Poem poem) {
		super(beanBags);
		this.poem = poem;
	}
	
	public void perform() throws PerformanceException {
		super.perform();
		System.out.println("While reciting...");
		poem.recite();
	}
	

}
